package com.ibeeking.found.common.enums.pay;

public enum PayWayEnum {
    ONLINE(1l,"线上"),
    OFFLINE(2l,"线下");

    private Long code;
    private String value;

    PayWayEnum(Long code, String value) {
        this.code = code;
        this.value = value;
    }

    public Long getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByCode(Long code) {
        for (PayWayEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getValue();
            }
        }
        return null;
    }
}
